import About from '@/routes/app/About/About';
import App from '@/routes/app/App';
import DataTable from '@/routes/app/DataTable/DataTable';
import Home from '@/routes/app/Home/Home';
import Visualization from '@/routes/app/Visualization/Visualization';
import DataV from '@/routes/DataV/DataV';
import { ReactNode } from 'react';
import Login from '@/routes/app/Login/Login';

export interface AppRoutes {
  readonly id: string;
  index?: boolean;
  path?: string;
  element?: ReactNode;
  errorElement?: ReactNode;
  title?: string;
  redirect?: string;
  icon?: ReactNode;
  children?: AppRoutes[];
}

const appRoutes: AppRoutes[] = [
  {
    id: 'app',
    path: '/',
    element: <App />,
    // errorElement: <ErrorPage />,
    children: [
      {
        id: 'home',
        path: '/home',
        element: <Home />,
        title: '首页',
      },
      // {
      //   id: 'visualization',
      //   path: '/visualization',
      //   element: <Visualization />,
      //   title: '数据视图',
      // },
      {
        id: 'dataTable',
        path: '/dataTable',
        element: <DataTable />,
        title: '数据列表',
      },
      {
        id: 'about',
        path: '/about',
        element: <About />,
        title: '中医药介绍与发展',
      },
      // {
      //   id: 'dataV',
      //   path: '/dataV',
      //   element: <DataV />,
      //   title: '可视化',
      // },
    ],
  },
  {
    id: 'login',
    path: '/login',
    element: <Login />,
    title: '登录',
  },
];

export default appRoutes;
